image1=imread('cameraman.tif');
[m,n]=size(image1);
des=uint8(zeros(m,n));
left=[2^1/2 2^1/2 0;-2^1/2 2^1/2 0;0 0 1];
for i=1:m
    for j=1:n
        t=left*[i;j;1];
        if t(1,1)<=m&&t(2,1)<=n&&t(1,1)>=1&&t(2,1)>=1
            des(t(1,1),t(2,1))=image1(i,j);
        end
    end
end
subplot(2,1,1)
imshow(uint8(image1));
subplot(2,1,2);
imshow(uint8(des));